package com.wtc.homework;

/**
 * @author 马可
 * @version 1.0
 * 内部类练习
 * 2023/5/10
 * IntelliJ IDEA
 */
public class Homework06 {
    public static void main(String[] args) {
        new Car(0.1).new Air().flow();
    }
}
class Car {
    private double temperature;

    public Car(double temperature) {
        this.temperature = temperature;
    }

    class Air {
        public void flow() {
            if (temperature >= 40) {
                System.out.println("现在吹冷风！");
            }
            if (temperature <= 0) {
                System.out.println("现在吹暖风！");
            }
            if (temperature > 0 && temperature < 40) {
                System.out.println("关闭空调！");
            }

        }
    }
}
